<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%

	String openId = (String)request.getSession().getAttribute("openId");
 %>
<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="stylesheet" href="../css/amazeui.min.css">
  <link rel="stylesheet" href="../css/wap.css">
  <link rel="stylesheet" href="../css/style.css"/>
  <link rel="stylesheet" href="../css/weui.css" />
  <title>专家列表</title>
</head>
  <script src="../js/jquery.js"></script>
  <script src="../js/amazeui.min.js"></script>
       <script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
   <script src="../js/jssdk.js"></script>
   <link rel="stylesheet" href="../css/dropload.css">
   <script src="../js/dropload.min.js"></script>
  <script type="text/javascript">
	$(function(){
			// 页数
			var page = 0;
			// 每页展示多少个
			var size = 10;
			// dropload
			$('.content').dropload({
				scrollArea : window,
				loadDownFn : function(me){
					page++;
					// 拼接HTML
					var result = '';
					$.ajax({
						type: 'post',
						url: '../expert/findAuditExpert?page='+page+"&size="+size,
						dataType: 'json',
						success: function(data){
							var arrLen = data.length;
							//alert(data);
							if(arrLen > 0){
								for(var i=0; i<arrLen; i++){
									 result +=   '<a class="weui-cell weui-cell_access" href="${ctx }/expert/findById?expertId='+data[i].id+'">'
										+' <span class="weui-cell__bd">'
										+'<span style="vertical-align: middle">'
										+'<div class="postType">'+data[i].name+'</div> '
										+' <div style="color:#969595;font-size:1.1rem;">'+data[i].expertType+'</div>'
										+'</span>'
										+'</span>'
										+' <span style="border:1px solid #e60012;color:#e60012;padding:0px 5px;border-radius:5px;">审核</span>'
										+'</a>';
								}
													
							// 如果没有数据
							}else{
								// 锁定
								me.lock();
								// 无数据
								me.noData();
							}
							// 插入数据到页面，放到最后面
							$('.expert').append(result);
							// 每次数据插入，必须重置
							me.resetload();
						},
						error: function(xhr, type){
							//alert('Ajax error!');
							// 即使加载出错，也得重置
							me.resetload();
						}
					});
				}
			});
		});
  </script>
<body style="background:#ececec" >
    <div class="pet_content pet_content_list pet_hd">
      <div class="pet_article_like">
        <div class="pet_content_main pet_article_like_delete">
          <div data-am-widget="list_news" class="am-list-news am-list-news-default am-no-layout">
            <div class="am-list-news-bd content">
				<div class="expert">
				
				</div>
			  </div>
            </div>
          </div>
        </div>
      </div>
 <!--底部-->
    <div data-am-widget="navbar" class="am-navbar am-cf my-nav-footer " id="">
      <ul class="am-navbar-nav am-cf am-avg-sm-4 my-footer-ul">
		<li>
           <a href="${ctx }/user/findUserIssue?issueTypeId=0" class="">
            <span class="am-icon-home"></span>
            <span class="am-navbar-label">首页</span>
          </a>
        </li>
        <li>
          <a href="${ctx }/issueType/findAll?mark=service&openId=<%=openId %>" class="">
            <span class="am-icon-comments"></span>
            <span class="am-navbar-label">提问</span>
          </a>
        </li>
		<li>
          <a href="${ctx }/postType/findAllPostType" class="">
            <span class="am-icon-book"></span>
            <span class="am-navbar-label">学习</span>
          </a>
        </li>
        <li style="position:relative">
          <a href="${ctx }/user/findByOpenId?openId=<%=openId %>" class="">
            <span class="am-icon-user"></span>
            <span class="am-navbar-label">我的</span>
          </a>
        </li>
      </ul>
</div>

    <script src="../js/text-calculation.js" ></script>
</body>
  </html>